package com.ning.parking.service.impl;

import com.scsonic.common.enums.parklot.ParkingLotConfigStatusEnum;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author ChenN
 * @Date 2025/4/22 10:19
 * @Version 0.0.1
 **/
@Service
public class ParkingLotConfigProcessService {
    private Map SUCCESS_MAP = new HashMap();
    private Map SUCCESS_AREA_CONFIG = new HashMap();
    private Map DRIVEWAYS = new HashMap();
    public void saveOrUpdateParkingLotConfig(Long parkingLotId, ConfigStepEnum baseInfoConfig, ParkingLotConfigStatusEnum finish) {
        SUCCESS_MAP.put(parkingLotId,baseInfoConfig);
        SUCCESS_MAP.put(parkingLotId+finish.getValue(),baseInfoConfig);
    }

    public void saveOrUpdateAreaConfig(Long parkingLotId, ParkingLotConfigStatusEnum undone) {
        SUCCESS_AREA_CONFIG.put(parkingLotId,undone);
    }

    public void saveOrUpdateDrivewayConfig(Long parkingLotId, Long drivewayId, ParkingLotConfigStatusEnum toBe) {
        DRIVEWAYS.put(drivewayId,toBe);
        SUCCESS_AREA_CONFIG.put(SUCCESS_AREA_CONFIG,toBe);
    }
}
